import { BasicColumn, FormSchema } from '@apps/antd-admin/src/components/table';
import { render } from '@apps/antd-admin/src/hooks/render/renderUtils';
export const columns: BasicColumn[] = [
  {
    title: '操作类型',
    dataIndex: 'optType',
    width: 200,
  },
  {
    title: '业务类型',
    dataIndex: 'busType',
    width: 200,
  },
  {
    title: '操作值',
    dataIndex: 'content',
    width: 200,
    customRender: render.renderHtmlToText,
  },
  {
    title: '操作人',
    dataIndex: 'userName',
    width: 120,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'startDate',
    label: '开始日期',
    component: 'DatePicker',
    colProps: { span: 6 },
    componentProps: {
      valueFormat: 'YYYY-MM-DD',
      format: 'YYYY-MM-DD',
    },
  },
  {
    field: 'endDate',
    label: '结束日期',
    component: 'DatePicker',
    colProps: { span: 6 },
    componentProps: {
      valueFormat: 'YYYY-MM-DD',
      format: 'YYYY-MM-DD',
    },
  },
  {
    field: 'optUserName',
    label: '操作人',
    component: 'Input',
    colProps: { span: 6 },
  },
];
